package com.shiro.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shiro.web.dao.MyBatisDao;
import com.shiro.web.model.Permission;

@Service
public class PermService {

	@Autowired
	private MyBatisDao myBatisDao;
	
	public List<String> getPermissions(List<String> roleCodes) {
		return myBatisDao.getList("PermMapper.get", roleCodes);
	}
	
	public List<Permission> getPermissions() {
		return myBatisDao.getList("PermMapper.query");
	}
}
